package com.r2coding.ent.api;

import com.r2coding.common.util.Result;
import com.r2coding.ent.service.PictureService;
import com.r2coding.ent.vo.req.GetAllPictureReqVo;
import com.r2coding.ent.vo.resp.GetAllPictureRespVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author:98k灬
 * @since:2022/06/27 21:59
 **/
@RestController
@RequestMapping("/api/picture")
public class ApiPictureController {
    @Autowired
    PictureService pictureService;

    /**
     * 根据相册id获取相册中所有的图片
     *
     * @param req 请求
     * @return 统一响应体
     */
    @PostMapping("/getAll")
    public Result getAll(@RequestBody GetAllPictureReqVo req) {
        GetAllPictureRespVo resp = pictureService.getAll(req);
        return Result.ok(resp);
    }
}
